how to derive the equation of a cycloid